import { useRoute } from 'vue-router'
import pubSub from 'pubsub-js'

const useCloseTab = () => {
    const route = useRoute()
    const closeTab = () => {
        pubSub.publish('closeTab',route)
    }

    return { closeTab }
}

export default useCloseTab